package com.example.service;

import com.example.dao.UserDao;
import com.example.model.User;
import com.sun.prism.impl.paint.PaintUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    UserDao userDao;

    public List<User> getAll(){
        return userDao.getAll();
    }

    public User getUserByID(int id){
        return userDao.getUserById(id);
    }

    public void  delete(int id){
        userDao.delete(id);
    }

    public void update(User u){
        userDao.update(u);
    }

    public void newp(User u){
        userDao.newp(u);
    }

}
